<?php

namespace common\models\survey;

use Yii;

/**
 * This is the model class for table "{{%survey_log}}".
 *
 * @property int $id
 * @property int $survey_id
 * @property int $user_id
 * @property int $admin_id
 * @property int $company_id
 * @property string $name
 * @property string $mark
 * @property int $status
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 */
class SurveyLog extends \common\db\ActiveRecord {

    /**
     * 状态
     */
    const STATUS_ACTIVE = 10;
    const STATUS_DEFAULT = 0;

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%survey_log}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['survey_id', 'user_id', 'admin_id', 'company_id', 'status', 'created_at', 'updated_at', 'deleted_at'], 'integer'],
            [['name'], 'string', 'max' => 50],
            [['mark'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'survey_id' => 'Survey ID',
            'user_id' => 'User ID',
            'admin_id' => 'Admin ID',
            'company_id' => 'Company ID',
            'name' => 'Name',
            'mark' => 'Mark',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
        ];
    }

}
